﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FireMVC;
//using FireMVCSample.Models;

namespace FireMVCSample.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        //EdushareDataContext dataContext = new EdushareDataContext();

        [Fire]
        public ActionResult Index()
        {
            FirePHP firePHP = FirePHP.GetInstance();

            //FirePHPLinqToSQLLogWriter logWriter = new FirePHPLinqToSQLLogWriter();
            //dataContext.Log = logWriter;
            //dataContext.Articles.First();

            firePHP.Info("정재성");
            firePHP.Info("Welcome to ASP.NET MVC!");
            firePHP.Critical("critical");
            firePHP.Debug("bug");
            firePHP.Error("error");
            try
            {
                throw new Exception("TestException");
            }
            catch (Exception e)
            {
                firePHP.Exception(e);
            }
            firePHP.Warn("ing");

            ViewData["Message"] = "Welcome to ASP.NET MVC!";

            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
